package com.ctshk.sapp.localfun.controller;


import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.localfun.dto.OperationLogListDTO;
import com.ctshk.rpc.localfun.req.OperationLogListReq;
import com.ctshk.rpc.localfun.service.IOperationLogService;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-02-24
 */
@RestController
@RequestMapping("/operation-log")
public class OperationLogController extends BaseController {

    @DubboReference
    private IOperationLogService iOperationLogService;

    @ApiOperation(value = "操作记录", notes = "操作记录")
    @PostMapping(value = "/list")
    public Result<PageResponse<OperationLogListDTO>> queryList(@RequestBody OperationLogListReq operationLogListReq) {

        return Result.success(iOperationLogService.list(operationLogListReq));
    }
}
